package cn.com.kisen.kdc.web;

import cn.com.kisen.kdc.domain.OpcTag;
import cn.com.kisen.kdc.domain.TagInfo;
import cn.com.kisen.kdc.service.OpcTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/opctag")
public class OpcTagController {

    @Autowired
    private OpcTagService opcTagService;

    @RequestMapping("loadMMSTagById/{opcTagId}")
    public OpcTag loadMMSTagById(@PathVariable Long opcTagId) {
        return opcTagService.loadMMSTagById(opcTagId);
    }

    @RequestMapping("loadDWHTagById/{dwhTagId}")
    public TagInfo loadDWHTagById(@PathVariable Long dwhTagId) {
        return opcTagService.loadDWHTagById(dwhTagId);
    }
}
